package com.ruoyi.quartz.task;

import com.ruoyi.market.http.model.param.GenBillParam;
import com.ruoyi.market.http.service.MarketApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * 生成账单
 * 凌晨00：30生成表单
 */
@Component("genBillTask")
public class GenBillTask {

    @Autowired
    MarketApiService marketApiService;

    /**
     * 生成前一日账单信息
     */
    public void genBillInfo()
    {

        GenBillParam genBillParam = new GenBillParam();
        genBillParam.setDateInfo(LocalDate.now().minusDays(1).toString());

        marketApiService.accountGenBillInfo(genBillParam);
    }

    public static void main(String[] args) {
        System.out.println(LocalDate.now().minusDays(1).toString());
    }

}
